import request from '@/utils/request'

// 查询读物分类列表
export function listDuwutype(query) {
  return request({
    url: '/ziliao/duwutype/list',
    method: 'get',
    params: query
  })
}

export function listDuwutypeAll(query) {
  return request({
    url: '/ziliao/duwutype/listAll',
    method: 'get',
    params: query
  })
}

// 查询读物分类详细
export function getDuwutype(id) {
  return request({
    url: '/ziliao/duwutype/' + id,
    method: 'get'
  })
}

// 新增读物分类
export function addDuwutype(data) {
  return request({
    url: '/ziliao/duwutype',
    method: 'post',
    data: data
  })
}

// 修改读物分类
export function updateDuwutype(data) {
  return request({
    url: '/ziliao/duwutype',
    method: 'put',
    data: data
  })
}

// 删除读物分类
export function delDuwutype(id) {
  return request({
    url: '/ziliao/duwutype/' + id,
    method: 'delete'
  })
}
